build: bump to sysprof 4 ABI
authorChristian Hergert <chergert@redhat.com>
Sat, 4 Jul 2020 18:40:21 +0000 (11:40 -0700)
committerChristian Hergert <chergert@redhat.com>
Tue, 28 Jul 2020 18:22:33 +0000 (11:22 -0700)
Sysprof has moved to a new ABI which removes GLib from the capture library
so that GLib itself can link against sysprof-capture.

This bumps the library ABI so we can keep things coordinated between all
the new tracing layers in the stack.

.gitlab-ci/fedora-base.Dockerfile
meson.build
subprojects/sysprof.wrap [new file with mode: 0644]
tests/testperf.c
testsuite/performance/test-performance.c

index cf31b534f712452d9fb78e8fcf762c6316c70c0d..4789ca17583b38f9a6f2acb1677f807c775df65b 100644 (file)
@@ -75,7 +75,6 @@ RUN dnf -y install \
     python3-wheel \
     redhat-rpm-config \
     sassc \
-    sysprof-devel \
     systemtap-sdt-devel \
     vulkan-devel \
     wayland-devel \
index 3ab900eb06541e2d71add135e8077834efba1f09..71d7fd399f09232d6e4883ab348f41866cec8c60 100644 (file)
@@ -687,7 +687,20 @@ endif
 
 profiler_enabled = get_option('profiler')
 if profiler_enabled
-  profiler_dep = dependency('sysprof-capture-3', static: true, required: true)
+  # libsysprof-capture support
+  profiler_dep = dependency('sysprof-capture-4',
+    required: true,
+    default_options: [
+      'enable_examples=false',
+      'enable_gtk=false',
+      'enable_tests=false',
+      'enable_tools=false',
+      'libsysprof=false',
+      'with_sysprofd=none',
+      'help=false',
+    ],
+    fallback: ['sysprof', 'libsysprof_capture_dep'],
+  )
   if profiler_dep.found()
     cdata.set('HAVE_SYSPROF_CAPTURE', profiler_dep.found())
   else
diff --git a/subprojects/sysprof.wrap b/subprojects/sysprof.wrap
new file mode 100644 (file)
index 0000000..b1cff4b
--- /dev/null
@@ -0,0 +1,4 @@
+[wrap-git]
+directory=sysprof
+url=https://gitlab.gnome.org/GNOME/sysprof.git
+revision=master
index c674516241b3fc1ab79782b26d88352704c15a39..a605720c6d774138d0500c9bf5247d9afeb990f3 100644 (file)
@@ -1,3 +1,4 @@
+#include <errno.h>
 #include <stdio.h>
 #include <sysprof-capture.h>
 #include <gio/gio.h>
@@ -7,7 +8,7 @@ typedef struct {
   gint64 value;
 } Data;
 
-static gboolean
+static bool
 callback (const SysprofCaptureFrame *frame,
           gpointer              user_data)
 {
@@ -94,9 +95,9 @@ main (int argc, char *argv[])
       g_object_unref (subprocess);
       g_object_unref (launcher);
 
-      reader = sysprof_capture_reader_new (name, &error);
-      if (error)
-        g_error ("Opening syscap file: %s", error->message);
+      reader = sysprof_capture_reader_new (name);
+      if (!reader)
+        g_error ("Opening syscap file: %s", g_strerror (errno));
 
       data.group = "style";
       data.value = 0;
index 8715eefcb0cf156de99fb6fb1a1094cff02ab523..be135c73baeac55436945d2acc7ed2ffa29c5db4 100644 (file)
@@ -14,9 +14,9 @@ typedef struct {
   gint64 value;
 } Data;
 
-static gboolean
+static bool
 callback (const SysprofCaptureFrame *frame,
-          gpointer              user_data)
+          gpointer                   user_data)
 {
   Data *data = user_data;
 
@@ -148,9 +148,9 @@ main (int argc, char *argv[])
       g_object_unref (subprocess);
       g_object_unref (launcher);
 
-      reader = sysprof_capture_reader_new (name, &error);
-      if (error)
-        g_error ("Opening syscap file: %s", error->message);
+      reader = sysprof_capture_reader_new (name);
+      if (!reader)
+        g_error ("Opening syscap file: %s", g_strerror (errno));
 
       data.mark = opt_mark ? opt_mark : "css validation";
       data.detail = opt_detail ? opt_detail : NULL;